if	fg_rat

RAT_OUT_INIT	PROC
		;
		;OPEN EXE OR COM FILE FOR OUTPUT
		;
		CALL	COMMON_OUT_INIT

		CALL	OPEN_OUTPUT
		MOV	_EXE_DEVICE,BX
		XOR	DX,DX
		MOV	EXEHDR_ADDR.LW,DX	;NEXT EXEHDR WRITE ADDRESS
		MOV	EXEHDR_ADDR.HW,DX

		RET

RAT_OUT_INIT	ENDP

endif

if fg_rat

		PUBLIC	RAT_OUT_TABLE

RAT_OUT_TABLE	LABEL	WORD

		DW	RAT_OUT_INIT
		DW	PROT_OUT_NEW_SEGMENT
		DW	PROT_OUT_NEW_SEGMOD
		DW	EXE_OUT_SEGMOD_FINISH
		DW	EXE_OUT_SEGMENT_FINISH
		DW	EXE_OUT_END_OF_SEGMENTS
		DW	PROT_FLUSH_SEGMOD
		DW	PROT_FLUSH_SEGMENT
		DW	RAT_OUT_FLUSH_EXE

endif


